#include <image.hpp>
/**
Color model by gfl sdk
GFL_CM_RGB    0 Red-Green-Blue
GFL_CM_GREY   1 Greyscale
GFL_CM_CMY    2 Cyan-Magenta-Yellow
GFL_CM_CMYK   3 Cyan-Magenta-Yellow-Black
GFL_CM_YCBCR  4 YCbCr
GFL_CM_YUV16  5 YUV 16bits
GFL_CM_LAB    6 Lab
GFL_CM_LOGLUV 7 Log Luv
GFL_CM_LOGL   8 Log L
**/


ColorModel * getColorModelFromGFLLibrary(const short &gfl_cm_color_model)
{
    ColorModel * res(0);
    switch( gfl_cm_color_model )
    {
        case 0: //GFL_CM_RGB
            res = RGB_SPACE;break;
        case 1: //GFL_CM_GREY
            res = GREY_SPACE;break;
        default:
            res = FREE_SPACE;break;
    }

    return res;
}

GFL_BITMAP_TYPE getGFLBitmapTypeFromColorModel(ColorModel * colorModel)
{
    GFL_BITMAP_TYPE res(0);

    if(      colorModel == RGB_SPACE)
        res = GFL_RGB;
    else if( colorModel == GREY_SPACE)
        res = GFL_GREY;
    else
        res = 0;
    return res;
}
